<?php defined('_JEXEC') or die('Restricted access'); ?>
<form action="index.php" method="post" name="adminForm">
<div id="com_docario">
    <div class="filters">
    </div>
    <div class="editcell">
        <table class="adminlist">
            <thead>
                <tr>
                    <th width="20">
                        <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->data); ?>);" />
                    </th>
                    <th width="20"><?php echo JText::_('ID'); ?></th>
                    <th><?php echo JText::_('COM_DOCARIO_NAME'); ?></th>
                    <th width="20"><?php echo JText::_('COM_DOCARIO_DELETE'); ?></th>
                </tr>
            </thead>
            <tfoot>
                <tr>
                    <td colspan="6">
                        <?php echo $this->pagination->getListFooter(); ?>
                    </td>
                </tr>
            </tfoot>
            <tbody>
                <?php
                $k = 0;
                foreach ($this->data as $i => $item) { 
                    $checked = JHTML::_('grid.id', $i, $item->id);
                    $link = JRoute::_('index.php?option=com_docario&controller=group&task=editGroup&fromlist=1&cid='.$item->id); 
                    $delete_link = JRoute::_('index.php?option=com_docario&controller=group&task=deletegroup&cid[]='.$item->id); ?>
                    <tr class="row<?php echo $k; ?>">
                        <td><?php echo $checked; ?></td>
                        <td><?php echo $item->id; ?></td>
                        <td>
                            <a href="<?php echo $link; ?>">
                                <?php echo $item->name; ?>
                            </a>
                        </td>
                        <td><a href="<?php echo $delete_link; ?>">
                            <?php echo JText::_('COM_DOCARIO_DELETE'); ?>
                        </a></td>
                    </tr>
                <?php $k = 1 - $k; } ?>
            </tbody>
        </table>
    </div>
</div>

<input type="hidden" name="controller" id="controller" value="group" />
<input type="hidden" name="option" id="option" value="com_docario" />
<input type="hidden" name="task" id="task" value="" />
<input type="hidden" name="boxchecked" id="boxchecked" value="0" />

</form>
